package com.bdq.basic.infrastructure.enums;

import lombok.Getter;

/**
 * @author malei
 * @date 2024-05-02 15:00
 */
@Getter
public enum FileEnum {

    /**
     * 头像
     */
    PIC_AVATAR(1,"/picture/avatar", "头像"),

    /**
     * 内容图片
     */
    PIC_CONTENT(2,"/picture/content", "内容图片"),

    /**
     * 认证图片
     */
    PIC_CERTIFICATION(3, "/picture/certification", "认证图片")
    ;

    private final int bizType;

    private final String path;

    private final String bziDesc;

    FileEnum(int bizType, String path, String bziDesc) {
        this.bizType = bizType;
        this.path = path;
        this.bziDesc = bziDesc;
    }

    public static FileEnum getByBizType(int bizType) {
        for (FileEnum anEnum : FileEnum.values()) {
            if (bizType == anEnum.bizType) {
                return anEnum;
            }
        }
        return null;
    }
}
